package com.zxn.kotlin;

public class TestJava {

    public static void main(String[] args) {
        //String url = "https://www.json.cn/yx/gomeka";
        String url = "https://www.json.cn/yx/";
        //String url = "https://www.json.cn/yx";
        //String result = url.split("yx")[1];
        //System.out.println(result);
        //System.out.println(url.substring(5));
        //int index = url.lastIndexOf("/yx/");
        //System.out.println(index);
        //System.out.println(url.substring(index));
        //System.out.println(url.substring(url.lastIndexOf("yx/")));
        //System.out.println(url.substring(url.lastIndexOf("yx/")).substring("yx/".length()));
        //System.out.println(url.substring(url.lastIndexOf("yx/")).substring("yx/".length()));
//        if (url.contains("yx/")) {
//            println(url.substring(url.lastIndexOf("yx/")).substring("yx/".length())+"*");
//        }
        println(url.substring(url.lastIndexOf("yx/")).substring("yx/".length())+"*");
    }

    private static void println(String s){
        System.out.println(s);
    }
}
